package com.zjw.spring.model;

public class Person {

	private int id;
	private String name;
	private int age;
	private Car car;
	
	public Person() {
		super();
		System.out.println("Person() construtor executed.. ");
	}
	
	public Person(int id, String name, int age, Car car) {
		super();
		this.id = id;
		this.name = name;
		this.age = age;
		this.car = car;
	}

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
		System.out.println(this.getClass().getName() + ".setName( " + name + " ) executed..");
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}

	public Car getCar() {
		return car;
	}

	public void setCar(Car car) {
		this.car = car;
	}


	@Override
	public String toString() {
		return "Person [id=" + id + ", name=" + name + ", age=" + age
				+ ", car=" + car + "]";
	}
	
}
